//
//  HLHomeListModel.m
//  YueYue
//
//  Created by hulu001 on 2023/5/17.
//

#import "HLHomeListModel.h"

@implementation HLHomeListModel

- (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property
{
    if ([property.name isEqualToString:@"opuses"]) {
        return [HLOpusModel mj_objectArrayWithKeyValuesArray:oldValue];
    } else if ([property.name isEqualToString:@"tagVOS"]) {
        return [HLHomeTagModel mj_objectArrayWithKeyValuesArray:oldValue];
    }
    
    return oldValue;
}


- (NSString *)info
{
    NSString *info;

    if (_countryName.length > 0){
        info = [NSString stringWithFormat:@"%@", _countryName];
    }
    
    if (_age.length > 0){
        if (info.length > 0){
            info = [NSString stringWithFormat:@"%@岁·%@", _age, info];
        } else {
            info = [NSString stringWithFormat:@"%@岁", _age];
        }
    }
    
   return info;
}

- (NSString *)selfSign
{
    if (_selfSign.length > 0){
        return _selfSign;
    }
    
    return @"TA太懒了还没有补充个性签名~";
}

- (NSString *)uid
{
    if (_userId == nil){
        return _customerId;
    }
    return _userId;
}

- (HLRtcCallVideoType)videoType
{
    if ([_isDiscount boolValue]){
        return HLRtcCallVideoTypeNormal;
    }
    return HLRtcCallVideoTypeNormal;
}

@end
